﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Smtp_server
{
    public partial class LoggerView : Form
    {
        public ILogger ilogger;

        public LoggerView(ILogger ilogger)
        {
            InitializeComponent();
            this.ilogger = ilogger;
            txtLog.Text = ilogger.Read();
        }
        public void SetILogger(ILogger ilogger)
        {
            this.ilogger = ilogger;
        }

        
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            txtLog.Text = ilogger.Read();
        }
    }
}